package org.ekingstar.qd.domain;

import java.util.Date;
import com.ekingstar.framework.security.UserUtil;

/**
 * AbstractQdHisCond entity provides the base persistence definition of the
 * QdHisCond entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public abstract class AbstractQdHisCond implements java.io.Serializable {

	// Fields

	private String id;
	private QdDomain TQdDomain;
	private String userId;
	private String condname;
	private String condstrcn;
	private String condstr;
	private Date createtime;
	private String descript;
	private String fieldstr;
	private String orderstr;
	private String ordertypestr;
	private String contype;

	// Constructors

	/** default constructor */
	public AbstractQdHisCond() {
	}

	/** full constructor */
	public AbstractQdHisCond(QdDomain TQdDomain, String userId,
			String condname, String condstrcn, String condstr, String fieldstr,
			String orderstr, String ordertypestr, Date createtime, String descript,String contype) {
		this.TQdDomain = TQdDomain;
		this.userId = userId;
		this.condname = condname;
		this.condstrcn = condstrcn;
		this.condstr = condstr;
		this.createtime = createtime;
		this.descript = descript;
		this.fieldstr = fieldstr;
		this.orderstr = orderstr;
		this.ordertypestr = ordertypestr;
		this.contype = contype;
	}

	// Property accessors

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public QdDomain getTQdDomain() {
		return this.TQdDomain;
	}

	public void setTQdDomain(QdDomain TQdDomain) {
		this.TQdDomain = TQdDomain;
	}

	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getCondname() {
		return this.condname;
	}

	public void setCondname(String condname) {
		this.condname = condname;
	}

	public String getCondstrcn() {
		return this.condstrcn;
	}

	public void setCondstrcn(String condstrcn) {
		this.condstrcn = condstrcn;
	}

	public String getCondstr() {
		return this.condstr;
	}

	public void setCondstr(String condstr) {
		this.condstr = condstr;
	}

	public Date getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public String getDescript() {
		return this.descript;
	}

	public void setDescript(String descript) {
		this.descript = descript;
	}

	public String getFieldstr() {
		return fieldstr;
	}

	public void setFieldstr(String fieldstr) {
		this.fieldstr = fieldstr;
	}

	public String getOrderstr() {
		return orderstr;
	}

	public void setOrderstr(String orderstr) {
		this.orderstr = orderstr;
	}

	public String getOrdertypestr() {
		return ordertypestr;
	}

	public void setOrdertypestr(String ordertypestr) {
		this.ordertypestr = ordertypestr;
	}

	public String getContype() {
		return contype;
	}

	public void setContype(String contype) {
		this.contype = contype;
	}
	
	public String getUserName(){
	   	String userName = userId;
	   	try {
	   		if(userId!=null && !"".equals(userId.toString().trim())){
	   			userName = UserUtil.getCurrentUser().getUsername();
	   		}
		} catch (Exception e) {
			e.printStackTrace();
			userName = userId;
		}
		return userName;
	}
}